package com.yuju.group.enums;

/**
 * 
 * 类名：hotelReturnCodeEnum  <br />
 *
 * 功能：功能：酒店业务代码枚举
 *
 * @author : sunyl <br />
 * @Date : 2017年11月23日 上午10:40:51  <br />
 * @version : 1.1 <br />
 */
public enum HotelReturnCodeEnum {
	Hotel_QUERY_SUCCESS("yuju-hotel-1000", "酒店信息查询成功"),
	Hotel_QUERY_FAILURE("yuju-hotel-1001", "酒店信息查询失败"),
	Hotel_SAVE_SUCCESS("yuju-hotel-1002", "酒店信息保存成功"),
	Hotel_SAVE_FAILURE("yuju-hotel-1003", "酒店信息保存失败"),
	Hotel_UPDATE_SUCCESS("yuju-hotel-1004", "酒店信息更新成功"),
	Hotel_UPDATE_FAILURE("yuju-hotel-1005", "酒店信息更新失败"),
	Hotel_CODE_SUCCESS("yuju-hotel-1006", "获取酒店编号成功"),
	Hotel_CODE_FAILURE("yuju-hotel-1007", "获取酒店编号失败"),
	Hotel_STOP_SUCCESS("yuju-hotel-1008", "停业成功"),
	Hotel_STOP_FAILURE("yuju-hotel-1009", "停业失败"),
	Hotel_RECOVER_SUCCESS("yuju-hotel-1010", "恢复营业成功"),
	Hotel_RECOVER_FAILURE("yuju-hotel-1011", "恢复营业编号失败"),
	Hotel_DEL_SUCCESS("yuju-hotel-1012", "酒店信息删除成功"),
	Hotel_DEL_FAILURE("yuju-hotel-1013", "酒店信息删除失败"),
	Hotel_VALIDREAPEATNAME_SUCCESS("yuju-1024", "酒店名称校验通过"),
	Hotel_VALIDREAPEATNAME_FAILURE("yuju-1023", "酒店名称校验未通过"),
	Hotel_QUERY_GROUP_SUCCESS("yuju-hotel-1025", "集团酒店信息查询成功"),
	Hotel_QUERY_GROUP_FAILURE("yuju-hotel-1026", "集团酒店信息查询失败"),
	Hotel_QUERY_PROVINCE_SUCCESS("yuju-hotel-1027", "省份信息查询成功"),
	Hotel_QUERY_CITY_SUCCESS("yuju-hotel-1028", "地级市信息查询成功"),
	Hotel_QUERY_TOWN_SUCCESS("yuju-hotel-1029", "县级市信息查询成功");
	
	private String code;
	private String desc;
	
	HotelReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (HotelReturnCodeEnum enume : HotelReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}